---
layout: "default"
title: "fatalError"
description: "Swift documentation for 'fatalError': Unconditionally print a message and stop execution."
keywords: "fatalError,func,swift,documentation"
root: "/v1.2"
---

<div class="declaration" id="func-fatalerror_-autoclosure-string-file_-staticstring-line_-uword">
<a class="toggle-link" data-toggle="collapse" href="#comment-func-fatalerror_-autoclosure-string-file_-staticstring-line_-uword">@noreturn  func fatalError(<wbr>_: @autoclosure (<wbr>) -&gt; String, file:<wbr> StaticString, line: UWord)</a>
        
<div class="comment collapse" id="comment-func-fatalerror_-autoclosure-string-file_-staticstring-line_-uword"><div class="p">
    <p>Unconditionally print a <code>message</code> and stop execution.</p>

    <h4>Declaration</h4>    
    <code class="language-swift">@noreturn  func fatalError(_ message: @autoclosure () -&gt; String = default, file: StaticString = default, line: UWord = default)</code>
    
    
</div></div>
</div>
